import request from '@/utils/request'

const base_url = 'http://127.0.0.1:8083/oauthDemo'

export function login(data) {
  return request({
    // url: '/vue-element-admin/user/login',
    url: base_url + '/dologin',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    // url: '/vue-element-admin/user/info',
    url: base_url + '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
